import React from 'react';
import { Link } from 'react-router-dom'
import './index.scss';

class Nav extends React.Component {
  constructor(props) {
    super(props);
    this.state = {

    }
    this.prevent = this.prevent.bind(this)
  }
  prevent(e) {
    e.preventDefault();
  }
  render() {
    return (
      <div id="nav">
        <ul className="menu">
          <li><Link to="/">博客首页</Link></li>
          <li><a href="#" onClick={this.prevent}>关于我</a>
            <ul>
              <li><Link to="/about">个人简介</Link></li>
              <li><Link to="/list-pic">个人相册</Link></li>
            </ul>
          </li>
          <li><Link to="/article-list/2">技术文章</Link></li>
          <li><Link to="/learn-note/7">学习笔记</Link></li>
          <li><Link to="/post-article/post">发表文章</Link></li>
        </ul>
      </div>
    )
  }
}
export default Nav;
